package com.yan.network;

import org.apache.http.client.methods.HttpGet;


public class RequestBuilder {

	private static final String TAG							= "RequestBuilder";
	
	private static final String ROOT_URL 					= "http://www.diyphonegadgets.com/feeds/posts/default?alt=";
	
	private static final String REQUEST_ACTION_ARTICLES		= "rss";


	
	
	private static StringBuffer rootQuery(){
		return new StringBuffer().append(ROOT_URL);
	}
	
	private static StringBuffer basicQuery(String action){
		StringBuffer query = rootQuery();

		query.append(action);
		return query;
	}
	


	public static HttpGet getArticlesQuery(){
		StringBuffer query = basicQuery(REQUEST_ACTION_ARTICLES);
		return getHttpRequest(query.toString());
	}




	private static HttpGet getHttpRequest (String url) {
    	HttpGet request = new HttpGet(url);

		return request;
	 }
	

}